package cn.com.chengmandian.service.iot;

import cn.com.chengmandian.core.web.pojo.AjaxResult;
import cn.com.chengmandian.service.iot.form.ChargeAddForm;
import cn.com.chengmandian.service.iot.form.OpsOpenBoxForm;
import cn.com.chengmandian.service.iot.pojo.ChargeAddResponse;
import cn.com.chengmandian.service.iot.pojo.ChargeDetailResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "cmd-iot-cabinet")
public interface IotCabinetClient {

    /**
     * 用户换电接口
     */
    @PostMapping("/iotcabinet/inner/cabinet/charge/add")
    AjaxResult<ChargeAddResponse> cabinetChargeAdd(@RequestBody ChargeAddForm chargeAddForm);

    /**
     * 用户换电查询
     */
    @GetMapping("/iotcabinet/inner/cabinet/charge/detail/{orderNo}")
    AjaxResult<ChargeDetailResponse> cabinetChargeDetail(@PathVariable("orderNo") String orderNo);

    /**
     * 开启电池仓
     */
    @PostMapping("/iotcabinet/inner/cabinet/aisle/open/{cabinetNo}")
    AjaxResult cabinetOpenAisle(@PathVariable("cabinetNo")String cabinetNo, @RequestBody OpsOpenBoxForm opsOpenBoxForm);
}
